package com.qmyx.supply.admin.shiro;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * shiro redis配置
 * 
 */
@Data
@Component
@RefreshScope
public class ShiroRedisProperties {
    /**
     * redisManager
     */
    @Value("${shiro-redis.redis-manager.host}")
    private String host;
    @Value("${shiro-redis.redis-manager.password:}")
    private String password;
    @Value("${shiro-redis.redis-manager.timeout}")
    private int timeout;
    @Value("${shiro-redis.redis-manager.database}")
    private int database;
    /**
     *sessionDao
     */
    @Value("${shiro-redis.session-dao.expire}")
    private int sessionExpire;
    @Value("${shiro-redis.session-dao.key-prefix}")
    private String sessionKeyPrefix;
    @Value("${shiro-redis.session-dao.session-in-memory-timeout}")
    private int sessionInMemoryTimeout;
    @Value("${shiro-redis.session-dao.session-in-memory-enabled}")
    private boolean sessionInMemoryEnabled;
    /**
     * cacheManager
     */
    @Value("${shiro-redis.cache-manager.expire}")
    private int cacheExpire;
    @Value("${shiro-redis.cache-manager.principal-id-field-name}")
    private String principalIdFieldName;
    @Value("${shiro-redis.cache-manager.key-prefix}")
    private String cacheKeyPrefix;
}
